﻿using DataAccess;
using System.Data;
using System.Collections.Generic;
using Entity;

namespace Business
{
    /// <summary>
    /// Summary description for CategoryBusines
    /// </summary>
    public class CategoryBusiness : AbstractBusiness
    {
        private readonly CategoryDAL _categoryDal;
        public CategoryBusiness()
        {
            _categoryDal = new CategoryDAL();
        }

        public List<Category> GetAll()
        {
            DataTable dataTable = _categoryDal.GetAll();
            List<Category> categories = new TypedList<Category>(dataTable);
            return categories;
        }
    }
}